﻿using StudentMgmt.DBUtility;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StudentMgmt.SQLServerDAL
{
    public class PunishLevelConfig { 
    
        public int QueryPunishLevel(int index, out DataTable objTable)
        {
            int val = 0;
            objTable = new DataTable();
            StringBuilder builder = new StringBuilder();
            builder.Append("select L.Punish_Descriptions as '处罚等级' ");
            builder.Append("from Punish_Levels_Config as L ");
            builder.Append("where 1=1 ");
            string punishlevel = "p000"+index;
            builder.Append("and L.Punish_Code='"+ punishlevel +"';");
            
            val = SqlHelper.RunSQLReturnDataTable(builder.ToString(), out objTable);
            return val;
        }
    }
}
